# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=fltk
pkgver=1.3.8
pkgrel=0
pkgdesc="A cross-platform C++ GUI toolkit"
url="http://fltk.org"
arch="all"
options="!check"  # No test suite.
license="LGPL-2.0-only WITH FLTK-exception"
depends_dev="libx11-dev libxext-dev libxft-dev mesa-dev libxinerama-dev"
makedepends="$depends_dev libpng-dev libjpeg-turbo-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-fluid"
source="http://fltk.org/pub/fltk/$pkgver/fltk-$pkgver-source.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-shared \
		--enable-threads \
		--with-optim="$CXXFLAGS"
	make V=1

}

package() {
	make DESTDIR="$pkgdir" install
	# remove static libs
	rm "$pkgdir"/usr/lib/*.a
}

fluid() {
	pkgdesc="Fast Light User Interface Designer"
	depends=
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="
5c1cbfc156c49888e25b90dcb9b1ab86a03447e08e00864c3c7ae8a0e32cfbd9154ee630054235c9edfd29fd1d0371ae77eff7b78094fb660dbbdec5cecfc8fb  fltk-1.3.8-source.tar.gz
"
